]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Generate GDBus proxy object for org.gtk.Application
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 18 Sep 2014 11:15:06 +0000 (12:15 +0100)
committerPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 27 Nov 2014 10:59:55 +0000 (10:59 +0000)
Having a proxy object will make it easier to monitor the application's
busy state.

This adds a dependency on gdbus-codegen

https://bugzilla.gnome.org/show_bug.cgi?id=736492

configure.ac
src/Makefile.am
src/org.gtk.Application.xml [new file with mode: 0644]

index ba173cedfc7760bd40dee5ba2600e60aacd8a879..b392f4990eb2fe28d6e8ab0a76ea5ad90b1252e4 100644 (file)
@@ -237,6 +237,12 @@ if test -z "${BROWSER_PLUGIN_DIR}"; then
 fi
 AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
 
+AC_ARG_VAR([GDBUS_CODEGEN],[the gdbus-codegen programme])
+AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen],[])
+if test -z "$GDBUS_CODEGEN"; then
+  AC_MSG_ERROR([gdbus-codegen not found])
+fi
+
 AC_CONFIG_FILES([
   Makefile
   data/Makefile
index a73eaaedfe9d1199732709ed138c53b437fe081a..dda1061e83b86e8606d695e46f62f60de907ce8e 100644 (file)
@@ -51,6 +51,12 @@ gnome-shell-extension-tool: gnome-shell-extension-tool.in Makefile
 gnome-shell-perf-tool: gnome-shell-perf-tool.in Makefile
        $(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@
 
+org-gtk-application.c org-gtk-application.h: org.gtk.Application.xml Makefile
+       $(AM_V_GEN) $(GDBUS_CODEGEN) \
+                       --generate-c-code org-gtk-application \
+                       --c-namespace Shell \
+                       $<
+
 CLEANFILES += gnome-shell $(bin_SCRIPTS)
 
 include Makefile-st.am
@@ -75,6 +81,8 @@ privlib_LTLIBRARIES = libgnome-shell-js.la libgnome-shell-menu.la libgnome-shell
 noinst_LTLIBRARIES += libgnome-shell-base.la
 
 shell_built_sources = \
+       org-gtk-application.h \
+       org-gtk-application.c \
        shell-enum-types.h \
        shell-enum-types.c
 
@@ -178,8 +186,12 @@ libgnome_shell_built_sources =             \
 libgnome_shell_la_SOURCES = $(libgnome_shell_sources)
 nodist_libgnome_shell_la_SOURCES = $(libgnome_shell_built_sources)
 
+shell_no_gir_sources = \
+       org-gtk-application.h \
+       org-gtk-application.c
+
 libgnome_shell_la_gir_sources = \
-       $(filter-out %-private.h $(shell_private_sources), $(shell_public_headers_h) $(libgnome_shell_base_la_SOURCES) $(libgnome_shell_sources) $(libgnome_shell_built_sources))
+       $(filter-out %-private.h $(shell_private_sources) $(shell_no_gir_sources), $(shell_public_headers_h) $(libgnome_shell_base_la_SOURCES) $(libgnome_shell_sources) $(libgnome_shell_built_sources))
 
 gnome_shell_SOURCES = main.c
 gnome_shell_CPPFLAGS = \
diff --git a/src/org.gtk.Application.xml b/src/org.gtk.Application.xml
new file mode 100644 (file)
index 0000000..161aa1d
--- /dev/null
@@ -0,0 +1,19 @@
+<node>
+  <interface name='org.gtk.Application'>
+    <method name='Activate'>
+      <arg type='a{sv}' name='platform_data' direction='in'/>
+    </method>
+    <method name='Open'>
+      <arg type='as' name='uris' direction='in'/>
+      <arg type='s' name='hint' direction='in'/>
+      <arg type='a{sv}' name='platform_data' direction='in'/>
+    </method>
+    <method name='CommandLine'>
+      <arg type='o' name='path' direction='in'/>
+      <arg type='aay' name='arguments' direction='in'/>
+      <arg type='a{sv}' name='platform_data' direction='in'/>
+      <arg type='i' name='exit_status' direction='out'/>
+    </method>
+    <property name='Busy' type='b' access='read'/>
+  </interface>
+</node>